package cnpm02.j2ee.group3.logic.dao.generic;

import java.util.List;

import cnpm02.j2ee.group3.model.AbstractEntity;
import cnpm02.j2ee.group3.model.AbstractTranslationEntity;
import cnpm02.j2ee.group3.model.SupportedLanguage;

public interface AbstractTranslationEntityDao<T extends AbstractTranslationEntity>
		extends AbstractEntityDao<T> {
	/**
	 * Select all records on the table which is related with T type and for the specific language
	 * @param language {@link SupportedLanguage}
	 * @return {@link List} of results
	 * */
	List<T> selectAllByLocale(SupportedLanguage language);
	
	/**
	 * Select translation for specific translatable entity by specific language
	 * @param entity entity needs translating
	 * @param language language which entity will be translated into
	 * @return translation {@link AbstractTranslationEntity}  
	 * 
	 * */
	T select(AbstractEntity entity, SupportedLanguage language);
}
